"""
    Pinterest REST API

    Pinterest's REST API  # noqa: E501

    The version of the OpenAPI document: 5.6.0
    Contact: pinterest-api@pinterest.com
    Generated by: https://openapi-generator.tech
"""


import re  # noqa: F401
import sys  # noqa: F401

from pinterest.generated.client.api_client import ApiClient, Endpoint as _Endpoint
from pinterest.generated.client.model_utils import (  # noqa: F401
    check_allowed_values,
    check_validations,
    date,
    datetime,
    file_type,
    none_type,
    validate_and_convert_types
)
from pinterest.generated.client.model.ad_group_array_response import AdGroupArrayResponse
from pinterest.generated.client.model.ad_group_create_request import AdGroupCreateRequest
from pinterest.generated.client.model.ad_group_response import AdGroupResponse
from pinterest.generated.client.model.ad_group_update_request import AdGroupUpdateRequest
from pinterest.generated.client.model.ad_groups_analytics_response import AdGroupsAnalyticsResponse
from pinterest.generated.client.model.ads_analytics_targeting_type import AdsAnalyticsTargetingType
from pinterest.generated.client.model.bid_floor import BidFloor
from pinterest.generated.client.model.bid_floor_request import BidFloorRequest
from pinterest.generated.client.model.conversion_report_attribution_type import ConversionReportAttributionType
from pinterest.generated.client.model.error import Error
from pinterest.generated.client.model.granularity import Granularity
from pinterest.generated.client.model.metrics_response import MetricsResponse
from pinterest.generated.client.model.paginated import Paginated


class AdGroupsApi(object):
    """NOTE: This class is auto generated by OpenAPI Generator
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.ad_groups_analytics_endpoint = _Endpoint(
            settings={
                'response_type': (AdGroupsAnalyticsResponse,),
                'auth': [
                    'pinterest_oauth2'
                ],
                'endpoint_path': '/ad_accounts/{ad_account_id}/ad_groups/analytics',
                'operation_id': 'ad_groups_analytics',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'ad_account_id',
                    'start_date',
                    'end_date',
                    'ad_group_ids',
                    'columns',
                    'granularity',
                    'click_window_days',
                    'engagement_window_days',
                    'view_window_days',
                    'conversion_report_time',
                ],
                'required': [
                    'ad_account_id',
                    'start_date',
                    'end_date',
                    'ad_group_ids',
                    'columns',
                    'granularity',
                ],
                'nullable': [
                ],
                'enum': [
                    'columns',
                    'click_window_days',
                    'engagement_window_days',
                    'view_window_days',
                    'conversion_report_time',
                ],
                'validation': [
                    'ad_account_id',
                    'ad_group_ids',
                ]
            },
            root_map={
                'validations': {
                    ('ad_account_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                    ('ad_group_ids',): {

                        'max_items': 100,
                        'min_items': 1,
                    },
                },
                'allowed_values': {
                    ('columns',): {

                        "ADVERTISER_ID": "ADVERTISER_ID",
                        "PIN_PROMOTION_ID": "PIN_PROMOTION_ID",
                        "AD_ACCOUNT_ID": "AD_ACCOUNT_ID",
                        "AD_GROUP_ENTITY_STATUS": "AD_GROUP_ENTITY_STATUS",
                        "AD_GROUP_ID": "AD_GROUP_ID",
                        "AD_ID": "AD_ID",
                        "CAMPAIGN_DAILY_SPEND_CAP": "CAMPAIGN_DAILY_SPEND_CAP",
                        "CAMPAIGN_ENTITY_STATUS": "CAMPAIGN_ENTITY_STATUS",
                        "CAMPAIGN_ID": "CAMPAIGN_ID",
                        "CAMPAIGN_LIFETIME_SPEND_CAP": "CAMPAIGN_LIFETIME_SPEND_CAP",
                        "CAMPAIGN_NAME": "CAMPAIGN_NAME",
                        "CHECKOUT_ROAS": "CHECKOUT_ROAS",
                        "CLICKTHROUGH_1": "CLICKTHROUGH_1",
                        "CLICKTHROUGH_1_GROSS": "CLICKTHROUGH_1_GROSS",
                        "CLICKTHROUGH_2": "CLICKTHROUGH_2",
                        "CPC_IN_MICRO_DOLLAR": "CPC_IN_MICRO_DOLLAR",
                        "CPM_IN_DOLLAR": "CPM_IN_DOLLAR",
                        "CPM_IN_MICRO_DOLLAR": "CPM_IN_MICRO_DOLLAR",
                        "CTR": "CTR",
                        "CTR_2": "CTR_2",
                        "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR",
                        "ECPCV_P95_IN_DOLLAR": "ECPCV_P95_IN_DOLLAR",
                        "ECPC_IN_DOLLAR": "ECPC_IN_DOLLAR",
                        "ECPC_IN_MICRO_DOLLAR": "ECPC_IN_MICRO_DOLLAR",
                        "ECPE_IN_DOLLAR": "ECPE_IN_DOLLAR",
                        "ECPM_IN_MICRO_DOLLAR": "ECPM_IN_MICRO_DOLLAR",
                        "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR",
                        "ECTR": "ECTR",
                        "EENGAGEMENT_RATE": "EENGAGEMENT_RATE",
                        "ENGAGEMENT_1": "ENGAGEMENT_1",
                        "ENGAGEMENT_2": "ENGAGEMENT_2",
                        "ENGAGEMENT_RATE": "ENGAGEMENT_RATE",
                        "IDEA_PIN_PRODUCT_TAG_VISIT_1": "IDEA_PIN_PRODUCT_TAG_VISIT_1",
                        "IDEA_PIN_PRODUCT_TAG_VISIT_2": "IDEA_PIN_PRODUCT_TAG_VISIT_2",
                        "IMPRESSION_1": "IMPRESSION_1",
                        "IMPRESSION_1_GROSS": "IMPRESSION_1_GROSS",
                        "IMPRESSION_2": "IMPRESSION_2",
                        "INAPP_CHECKOUT_COST_PER_ACTION": "INAPP_CHECKOUT_COST_PER_ACTION",
                        "OUTBOUND_CLICK_1": "OUTBOUND_CLICK_1",
                        "OUTBOUND_CLICK_2": "OUTBOUND_CLICK_2",
                        "PAGE_VISIT_COST_PER_ACTION": "PAGE_VISIT_COST_PER_ACTION",
                        "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS",
                        "PAID_IMPRESSION": "PAID_IMPRESSION",
                        "PIN_ID": "PIN_ID",
                        "REPIN_1": "REPIN_1",
                        "REPIN_2": "REPIN_2",
                        "REPIN_RATE": "REPIN_RATE",
                        "SPEND_IN_DOLLAR": "SPEND_IN_DOLLAR",
                        "SPEND_IN_MICRO_DOLLAR": "SPEND_IN_MICRO_DOLLAR",
                        "TOTAL_CHECKOUT": "TOTAL_CHECKOUT",
                        "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_CLICKTHROUGH": "TOTAL_CLICKTHROUGH",
                        "TOTAL_CLICK_ADD_TO_CART": "TOTAL_CLICK_ADD_TO_CART",
                        "TOTAL_CLICK_CHECKOUT": "TOTAL_CLICK_CHECKOUT",
                        "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_CLICK_LEAD": "TOTAL_CLICK_LEAD",
                        "TOTAL_CLICK_SIGNUP": "TOTAL_CLICK_SIGNUP",
                        "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_CONVERSIONS": "TOTAL_CONVERSIONS",
                        "TOTAL_CUSTOM": "TOTAL_CUSTOM",
                        "TOTAL_ENGAGEMENT": "TOTAL_ENGAGEMENT",
                        "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT",
                        "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD",
                        "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP",
                        "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT": "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT",
                        "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY",
                        "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER",
                        "TOTAL_LEAD": "TOTAL_LEAD",
                        "TOTAL_OFFLINE_CHECKOUT": "TOTAL_OFFLINE_CHECKOUT",
                        "TOTAL_PAGE_VISIT": "TOTAL_PAGE_VISIT",
                        "TOTAL_REPIN_RATE": "TOTAL_REPIN_RATE",
                        "TOTAL_SIGNUP": "TOTAL_SIGNUP",
                        "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_VIDEO_3SEC_VIEWS": "TOTAL_VIDEO_3SEC_VIEWS",
                        "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND": "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND",
                        "TOTAL_VIDEO_MRC_VIEWS": "TOTAL_VIDEO_MRC_VIEWS",
                        "TOTAL_VIDEO_P0_COMBINED": "TOTAL_VIDEO_P0_COMBINED",
                        "TOTAL_VIDEO_P100_COMPLETE": "TOTAL_VIDEO_P100_COMPLETE",
                        "TOTAL_VIDEO_P25_COMBINED": "TOTAL_VIDEO_P25_COMBINED",
                        "TOTAL_VIDEO_P50_COMBINED": "TOTAL_VIDEO_P50_COMBINED",
                        "TOTAL_VIDEO_P75_COMBINED": "TOTAL_VIDEO_P75_COMBINED",
                        "TOTAL_VIDEO_P95_COMBINED": "TOTAL_VIDEO_P95_COMBINED",
                        "TOTAL_VIEW_ADD_TO_CART": "TOTAL_VIEW_ADD_TO_CART",
                        "TOTAL_VIEW_CHECKOUT": "TOTAL_VIEW_CHECKOUT",
                        "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_VIEW_LEAD": "TOTAL_VIEW_LEAD",
                        "TOTAL_VIEW_SIGNUP": "TOTAL_VIEW_SIGNUP",
                        "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_CHECKOUT": "TOTAL_WEB_CHECKOUT",
                        "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_CLICK_CHECKOUT": "TOTAL_WEB_CLICK_CHECKOUT",
                        "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_ENGAGEMENT_CHECKOUT": "TOTAL_WEB_ENGAGEMENT_CHECKOUT",
                        "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_SESSIONS": "TOTAL_WEB_SESSIONS",
                        "TOTAL_WEB_VIEW_CHECKOUT": "TOTAL_WEB_VIEW_CHECKOUT",
                        "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2",
                        "VIDEO_LENGTH": "VIDEO_LENGTH",
                        "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2",
                        "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2",
                        "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2",
                        "VIDEO_P25_COMBINED_2": "VIDEO_P25_COMBINED_2",
                        "VIDEO_P50_COMBINED_2": "VIDEO_P50_COMBINED_2",
                        "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2",
                        "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2",
                        "WEB_CHECKOUT_COST_PER_ACTION": "WEB_CHECKOUT_COST_PER_ACTION",
                        "WEB_CHECKOUT_ROAS": "WEB_CHECKOUT_ROAS",
                        "WEB_SESSIONS_1": "WEB_SESSIONS_1",
                        "WEB_SESSIONS_2": "WEB_SESSIONS_2"
                    },
                    ('click_window_days',): {

                        "1": 1,
                        "7": 7,
                        "30": 30,
                        "60": 60
                    },
                    ('engagement_window_days',): {

                        "1": 1,
                        "7": 7,
                        "30": 30,
                        "60": 60
                    },
                    ('view_window_days',): {

                        "1": 1,
                        "7": 7,
                        "30": 30,
                        "60": 60
                    },
                    ('conversion_report_time',): {

                        "AD_ACTION": "TIME_OF_AD_ACTION",
                        "CONVERSION": "TIME_OF_CONVERSION"
                    },
                },
                'openapi_types': {
                    'ad_account_id':
                        (str,),
                    'start_date':
                        (date,),
                    'end_date':
                        (date,),
                    'ad_group_ids':
                        ([str],),
                    'columns':
                        ([str],),
                    'granularity':
                        (Granularity,),
                    'click_window_days':
                        (int,),
                    'engagement_window_days':
                        (int,),
                    'view_window_days':
                        (int,),
                    'conversion_report_time':
                        (str,),
                },
                'attribute_map': {
                    'ad_account_id': 'ad_account_id',
                    'start_date': 'start_date',
                    'end_date': 'end_date',
                    'ad_group_ids': 'ad_group_ids',
                    'columns': 'columns',
                    'granularity': 'granularity',
                    'click_window_days': 'click_window_days',
                    'engagement_window_days': 'engagement_window_days',
                    'view_window_days': 'view_window_days',
                    'conversion_report_time': 'conversion_report_time',
                },
                'location_map': {
                    'ad_account_id': 'path',
                    'start_date': 'query',
                    'end_date': 'query',
                    'ad_group_ids': 'query',
                    'columns': 'query',
                    'granularity': 'query',
                    'click_window_days': 'query',
                    'engagement_window_days': 'query',
                    'view_window_days': 'query',
                    'conversion_report_time': 'query',
                },
                'collection_format_map': {
                    'ad_group_ids': 'multi',
                    'columns': 'csv',
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.ad_groups_bid_floor_get_endpoint = _Endpoint(
            settings={
                'response_type': (BidFloor,),
                'auth': [
                    'pinterest_oauth2'
                ],
                'endpoint_path': '/ad_accounts/{ad_account_id}/bid_floor',
                'operation_id': 'ad_groups_bid_floor_get',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'ad_account_id',
                    'bid_floor_request',
                ],
                'required': [
                    'ad_account_id',
                    'bid_floor_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'ad_account_id',
                ]
            },
            root_map={
                'validations': {
                    ('ad_account_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'ad_account_id':
                        (str,),
                    'bid_floor_request':
                        (BidFloorRequest,),
                },
                'attribute_map': {
                    'ad_account_id': 'ad_account_id',
                },
                'location_map': {
                    'ad_account_id': 'path',
                    'bid_floor_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.ad_groups_create_endpoint = _Endpoint(
            settings={
                'response_type': (AdGroupArrayResponse,),
                'auth': [
                    'pinterest_oauth2'
                ],
                'endpoint_path': '/ad_accounts/{ad_account_id}/ad_groups',
                'operation_id': 'ad_groups_create',
                'http_method': 'POST',
                'servers': None,
            },
            params_map={
                'all': [
                    'ad_account_id',
                    'ad_group_create_request',
                ],
                'required': [
                    'ad_account_id',
                    'ad_group_create_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'ad_account_id',
                    'ad_group_create_request',
                ]
            },
            root_map={
                'validations': {
                    ('ad_account_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                    ('ad_group_create_request',): {

                        'max_items': 30,
                        'min_items': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'ad_account_id':
                        (str,),
                    'ad_group_create_request':
                        ([AdGroupCreateRequest],),
                },
                'attribute_map': {
                    'ad_account_id': 'ad_account_id',
                },
                'location_map': {
                    'ad_account_id': 'path',
                    'ad_group_create_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )
        self.ad_groups_get_endpoint = _Endpoint(
            settings={
                'response_type': (AdGroupResponse,),
                'auth': [
                    'pinterest_oauth2'
                ],
                'endpoint_path': '/ad_accounts/{ad_account_id}/ad_groups/{ad_group_id}',
                'operation_id': 'ad_groups_get',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'ad_account_id',
                    'ad_group_id',
                ],
                'required': [
                    'ad_account_id',
                    'ad_group_id',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'ad_account_id',
                    'ad_group_id',
                ]
            },
            root_map={
                'validations': {
                    ('ad_account_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                    ('ad_group_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'ad_account_id':
                        (str,),
                    'ad_group_id':
                        (str,),
                },
                'attribute_map': {
                    'ad_account_id': 'ad_account_id',
                    'ad_group_id': 'ad_group_id',
                },
                'location_map': {
                    'ad_account_id': 'path',
                    'ad_group_id': 'path',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.ad_groups_list_endpoint = _Endpoint(
            settings={
                'response_type': (bool, date, datetime, dict, float, int, list, str, none_type,),
                'auth': [
                    'pinterest_oauth2'
                ],
                'endpoint_path': '/ad_accounts/{ad_account_id}/ad_groups',
                'operation_id': 'ad_groups_list',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'ad_account_id',
                    'campaign_ids',
                    'ad_group_ids',
                    'entity_statuses',
                    'page_size',
                    'order',
                    'bookmark',
                    'translate_interests_to_names',
                ],
                'required': [
                    'ad_account_id',
                ],
                'nullable': [
                ],
                'enum': [
                    'entity_statuses',
                    'order',
                ],
                'validation': [
                    'ad_account_id',
                    'campaign_ids',
                    'ad_group_ids',
                    'page_size',
                ]
            },
            root_map={
                'validations': {
                    ('ad_account_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                    ('campaign_ids',): {

                        'max_items': 100,
                        'min_items': 1,
                    },
                    ('ad_group_ids',): {

                        'max_items': 100,
                        'min_items': 1,
                    },
                    ('page_size',): {

                        'inclusive_maximum': 250,
                        'inclusive_minimum': 1,
                    },
                },
                'allowed_values': {
                    ('entity_statuses',): {

                        "ACTIVE": "ACTIVE",
                        "PAUSED": "PAUSED",
                        "ARCHIVED": "ARCHIVED"
                    },
                    ('order',): {

                        "ASCENDING": "ASCENDING",
                        "DESCENDING": "DESCENDING"
                    },
                },
                'openapi_types': {
                    'ad_account_id':
                        (str,),
                    'campaign_ids':
                        ([str],),
                    'ad_group_ids':
                        ([str],),
                    'entity_statuses':
                        ([str],),
                    'page_size':
                        (int,),
                    'order':
                        (str,),
                    'bookmark':
                        (str,),
                    'translate_interests_to_names':
                        (bool,),
                },
                'attribute_map': {
                    'ad_account_id': 'ad_account_id',
                    'campaign_ids': 'campaign_ids',
                    'ad_group_ids': 'ad_group_ids',
                    'entity_statuses': 'entity_statuses',
                    'page_size': 'page_size',
                    'order': 'order',
                    'bookmark': 'bookmark',
                    'translate_interests_to_names': 'translate_interests_to_names',
                },
                'location_map': {
                    'ad_account_id': 'path',
                    'campaign_ids': 'query',
                    'ad_group_ids': 'query',
                    'entity_statuses': 'query',
                    'page_size': 'query',
                    'order': 'query',
                    'bookmark': 'query',
                    'translate_interests_to_names': 'query',
                },
                'collection_format_map': {
                    'campaign_ids': 'multi',
                    'ad_group_ids': 'multi',
                    'entity_statuses': 'multi',
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.ad_groups_targeting_analytics_get_endpoint = _Endpoint(
            settings={
                'response_type': (MetricsResponse,),
                'auth': [
                    'pinterest_oauth2'
                ],
                'endpoint_path': '/ad_accounts/{ad_account_id}/ad_groups/targeting_analytics',
                'operation_id': 'ad_groups_targeting_analytics_get',
                'http_method': 'GET',
                'servers': None,
            },
            params_map={
                'all': [
                    'ad_account_id',
                    'ad_group_ids',
                    'start_date',
                    'end_date',
                    'targeting_types',
                    'columns',
                    'granularity',
                    'click_window_days',
                    'engagement_window_days',
                    'view_window_days',
                    'conversion_report_time',
                    'attribution_types',
                ],
                'required': [
                    'ad_account_id',
                    'ad_group_ids',
                    'start_date',
                    'end_date',
                    'targeting_types',
                    'columns',
                    'granularity',
                ],
                'nullable': [
                ],
                'enum': [
                    'columns',
                    'click_window_days',
                    'engagement_window_days',
                    'view_window_days',
                    'conversion_report_time',
                ],
                'validation': [
                    'ad_account_id',
                    'ad_group_ids',
                    'targeting_types',
                ]
            },
            root_map={
                'validations': {
                    ('ad_account_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                    ('ad_group_ids',): {

                        'max_items': 100,
                        'min_items': 1,
                    },
                    ('targeting_types',): {

                        'max_items': 15,
                        'min_items': 1,
                    },
                },
                'allowed_values': {
                    ('columns',): {

                        "ADVERTISER_ID": "ADVERTISER_ID",
                        "PIN_PROMOTION_ID": "PIN_PROMOTION_ID",
                        "AD_ACCOUNT_ID": "AD_ACCOUNT_ID",
                        "AD_GROUP_ENTITY_STATUS": "AD_GROUP_ENTITY_STATUS",
                        "AD_GROUP_ID": "AD_GROUP_ID",
                        "AD_ID": "AD_ID",
                        "CAMPAIGN_DAILY_SPEND_CAP": "CAMPAIGN_DAILY_SPEND_CAP",
                        "CAMPAIGN_ENTITY_STATUS": "CAMPAIGN_ENTITY_STATUS",
                        "CAMPAIGN_ID": "CAMPAIGN_ID",
                        "CAMPAIGN_LIFETIME_SPEND_CAP": "CAMPAIGN_LIFETIME_SPEND_CAP",
                        "CAMPAIGN_NAME": "CAMPAIGN_NAME",
                        "CHECKOUT_ROAS": "CHECKOUT_ROAS",
                        "CLICKTHROUGH_1": "CLICKTHROUGH_1",
                        "CLICKTHROUGH_1_GROSS": "CLICKTHROUGH_1_GROSS",
                        "CLICKTHROUGH_2": "CLICKTHROUGH_2",
                        "CPC_IN_MICRO_DOLLAR": "CPC_IN_MICRO_DOLLAR",
                        "CPM_IN_DOLLAR": "CPM_IN_DOLLAR",
                        "CPM_IN_MICRO_DOLLAR": "CPM_IN_MICRO_DOLLAR",
                        "CTR": "CTR",
                        "CTR_2": "CTR_2",
                        "ECPCV_IN_DOLLAR": "ECPCV_IN_DOLLAR",
                        "ECPCV_P95_IN_DOLLAR": "ECPCV_P95_IN_DOLLAR",
                        "ECPC_IN_DOLLAR": "ECPC_IN_DOLLAR",
                        "ECPC_IN_MICRO_DOLLAR": "ECPC_IN_MICRO_DOLLAR",
                        "ECPE_IN_DOLLAR": "ECPE_IN_DOLLAR",
                        "ECPM_IN_MICRO_DOLLAR": "ECPM_IN_MICRO_DOLLAR",
                        "ECPV_IN_DOLLAR": "ECPV_IN_DOLLAR",
                        "ECTR": "ECTR",
                        "EENGAGEMENT_RATE": "EENGAGEMENT_RATE",
                        "ENGAGEMENT_1": "ENGAGEMENT_1",
                        "ENGAGEMENT_2": "ENGAGEMENT_2",
                        "ENGAGEMENT_RATE": "ENGAGEMENT_RATE",
                        "IDEA_PIN_PRODUCT_TAG_VISIT_1": "IDEA_PIN_PRODUCT_TAG_VISIT_1",
                        "IDEA_PIN_PRODUCT_TAG_VISIT_2": "IDEA_PIN_PRODUCT_TAG_VISIT_2",
                        "IMPRESSION_1": "IMPRESSION_1",
                        "IMPRESSION_1_GROSS": "IMPRESSION_1_GROSS",
                        "IMPRESSION_2": "IMPRESSION_2",
                        "INAPP_CHECKOUT_COST_PER_ACTION": "INAPP_CHECKOUT_COST_PER_ACTION",
                        "OUTBOUND_CLICK_1": "OUTBOUND_CLICK_1",
                        "OUTBOUND_CLICK_2": "OUTBOUND_CLICK_2",
                        "PAGE_VISIT_COST_PER_ACTION": "PAGE_VISIT_COST_PER_ACTION",
                        "PAGE_VISIT_ROAS": "PAGE_VISIT_ROAS",
                        "PAID_IMPRESSION": "PAID_IMPRESSION",
                        "PIN_ID": "PIN_ID",
                        "REPIN_1": "REPIN_1",
                        "REPIN_2": "REPIN_2",
                        "REPIN_RATE": "REPIN_RATE",
                        "SPEND_IN_DOLLAR": "SPEND_IN_DOLLAR",
                        "SPEND_IN_MICRO_DOLLAR": "SPEND_IN_MICRO_DOLLAR",
                        "TOTAL_CHECKOUT": "TOTAL_CHECKOUT",
                        "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_CLICKTHROUGH": "TOTAL_CLICKTHROUGH",
                        "TOTAL_CLICK_ADD_TO_CART": "TOTAL_CLICK_ADD_TO_CART",
                        "TOTAL_CLICK_CHECKOUT": "TOTAL_CLICK_CHECKOUT",
                        "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_CLICK_LEAD": "TOTAL_CLICK_LEAD",
                        "TOTAL_CLICK_SIGNUP": "TOTAL_CLICK_SIGNUP",
                        "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_CLICK_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_CONVERSIONS": "TOTAL_CONVERSIONS",
                        "TOTAL_CUSTOM": "TOTAL_CUSTOM",
                        "TOTAL_ENGAGEMENT": "TOTAL_ENGAGEMENT",
                        "TOTAL_ENGAGEMENT_CHECKOUT": "TOTAL_ENGAGEMENT_CHECKOUT",
                        "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_ENGAGEMENT_LEAD": "TOTAL_ENGAGEMENT_LEAD",
                        "TOTAL_ENGAGEMENT_SIGNUP": "TOTAL_ENGAGEMENT_SIGNUP",
                        "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_ENGAGEMENT_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT": "TOTAL_IDEA_PIN_PRODUCT_TAG_VISIT",
                        "TOTAL_IMPRESSION_FREQUENCY": "TOTAL_IMPRESSION_FREQUENCY",
                        "TOTAL_IMPRESSION_USER": "TOTAL_IMPRESSION_USER",
                        "TOTAL_LEAD": "TOTAL_LEAD",
                        "TOTAL_OFFLINE_CHECKOUT": "TOTAL_OFFLINE_CHECKOUT",
                        "TOTAL_PAGE_VISIT": "TOTAL_PAGE_VISIT",
                        "TOTAL_REPIN_RATE": "TOTAL_REPIN_RATE",
                        "TOTAL_SIGNUP": "TOTAL_SIGNUP",
                        "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_VIDEO_3SEC_VIEWS": "TOTAL_VIDEO_3SEC_VIEWS",
                        "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND": "TOTAL_VIDEO_AVG_WATCHTIME_IN_SECOND",
                        "TOTAL_VIDEO_MRC_VIEWS": "TOTAL_VIDEO_MRC_VIEWS",
                        "TOTAL_VIDEO_P0_COMBINED": "TOTAL_VIDEO_P0_COMBINED",
                        "TOTAL_VIDEO_P100_COMPLETE": "TOTAL_VIDEO_P100_COMPLETE",
                        "TOTAL_VIDEO_P25_COMBINED": "TOTAL_VIDEO_P25_COMBINED",
                        "TOTAL_VIDEO_P50_COMBINED": "TOTAL_VIDEO_P50_COMBINED",
                        "TOTAL_VIDEO_P75_COMBINED": "TOTAL_VIDEO_P75_COMBINED",
                        "TOTAL_VIDEO_P95_COMBINED": "TOTAL_VIDEO_P95_COMBINED",
                        "TOTAL_VIEW_ADD_TO_CART": "TOTAL_VIEW_ADD_TO_CART",
                        "TOTAL_VIEW_CHECKOUT": "TOTAL_VIEW_CHECKOUT",
                        "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_VIEW_LEAD": "TOTAL_VIEW_LEAD",
                        "TOTAL_VIEW_SIGNUP": "TOTAL_VIEW_SIGNUP",
                        "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR": "TOTAL_VIEW_SIGNUP_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_CHECKOUT": "TOTAL_WEB_CHECKOUT",
                        "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_CLICK_CHECKOUT": "TOTAL_WEB_CLICK_CHECKOUT",
                        "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_CLICK_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_ENGAGEMENT_CHECKOUT": "TOTAL_WEB_ENGAGEMENT_CHECKOUT",
                        "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_ENGAGEMENT_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "TOTAL_WEB_SESSIONS": "TOTAL_WEB_SESSIONS",
                        "TOTAL_WEB_VIEW_CHECKOUT": "TOTAL_WEB_VIEW_CHECKOUT",
                        "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR": "TOTAL_WEB_VIEW_CHECKOUT_VALUE_IN_MICRO_DOLLAR",
                        "VIDEO_3SEC_VIEWS_2": "VIDEO_3SEC_VIEWS_2",
                        "VIDEO_LENGTH": "VIDEO_LENGTH",
                        "VIDEO_MRC_VIEWS_2": "VIDEO_MRC_VIEWS_2",
                        "VIDEO_P0_COMBINED_2": "VIDEO_P0_COMBINED_2",
                        "VIDEO_P100_COMPLETE_2": "VIDEO_P100_COMPLETE_2",
                        "VIDEO_P25_COMBINED_2": "VIDEO_P25_COMBINED_2",
                        "VIDEO_P50_COMBINED_2": "VIDEO_P50_COMBINED_2",
                        "VIDEO_P75_COMBINED_2": "VIDEO_P75_COMBINED_2",
                        "VIDEO_P95_COMBINED_2": "VIDEO_P95_COMBINED_2",
                        "WEB_CHECKOUT_COST_PER_ACTION": "WEB_CHECKOUT_COST_PER_ACTION",
                        "WEB_CHECKOUT_ROAS": "WEB_CHECKOUT_ROAS",
                        "WEB_SESSIONS_1": "WEB_SESSIONS_1",
                        "WEB_SESSIONS_2": "WEB_SESSIONS_2"
                    },
                    ('click_window_days',): {

                        "1": 1,
                        "7": 7,
                        "30": 30,
                        "60": 60
                    },
                    ('engagement_window_days',): {

                        "1": 1,
                        "7": 7,
                        "30": 30,
                        "60": 60
                    },
                    ('view_window_days',): {

                        "1": 1,
                        "7": 7,
                        "30": 30,
                        "60": 60
                    },
                    ('conversion_report_time',): {

                        "AD_ACTION": "TIME_OF_AD_ACTION",
                        "CONVERSION": "TIME_OF_CONVERSION"
                    },
                },
                'openapi_types': {
                    'ad_account_id':
                        (str,),
                    'ad_group_ids':
                        ([str],),
                    'start_date':
                        (date,),
                    'end_date':
                        (date,),
                    'targeting_types':
                        ([AdsAnalyticsTargetingType],),
                    'columns':
                        ([str],),
                    'granularity':
                        (Granularity,),
                    'click_window_days':
                        (int,),
                    'engagement_window_days':
                        (int,),
                    'view_window_days':
                        (int,),
                    'conversion_report_time':
                        (str,),
                    'attribution_types':
                        (ConversionReportAttributionType,),
                },
                'attribute_map': {
                    'ad_account_id': 'ad_account_id',
                    'ad_group_ids': 'ad_group_ids',
                    'start_date': 'start_date',
                    'end_date': 'end_date',
                    'targeting_types': 'targeting_types',
                    'columns': 'columns',
                    'granularity': 'granularity',
                    'click_window_days': 'click_window_days',
                    'engagement_window_days': 'engagement_window_days',
                    'view_window_days': 'view_window_days',
                    'conversion_report_time': 'conversion_report_time',
                    'attribution_types': 'attribution_types',
                },
                'location_map': {
                    'ad_account_id': 'path',
                    'ad_group_ids': 'query',
                    'start_date': 'query',
                    'end_date': 'query',
                    'targeting_types': 'query',
                    'columns': 'query',
                    'granularity': 'query',
                    'click_window_days': 'query',
                    'engagement_window_days': 'query',
                    'view_window_days': 'query',
                    'conversion_report_time': 'query',
                    'attribution_types': 'query',
                },
                'collection_format_map': {
                    'ad_group_ids': 'multi',
                    'targeting_types': 'csv',
                    'columns': 'csv',
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [],
            },
            api_client=api_client
        )
        self.ad_groups_update_endpoint = _Endpoint(
            settings={
                'response_type': (AdGroupArrayResponse,),
                'auth': [
                    'pinterest_oauth2'
                ],
                'endpoint_path': '/ad_accounts/{ad_account_id}/ad_groups',
                'operation_id': 'ad_groups_update',
                'http_method': 'PATCH',
                'servers': None,
            },
            params_map={
                'all': [
                    'ad_account_id',
                    'ad_group_update_request',
                ],
                'required': [
                    'ad_account_id',
                    'ad_group_update_request',
                ],
                'nullable': [
                ],
                'enum': [
                ],
                'validation': [
                    'ad_account_id',
                    'ad_group_update_request',
                ]
            },
            root_map={
                'validations': {
                    ('ad_account_id',): {
                        'max_length': 18,
                        'regex': {
                            'pattern': r'^\d+$',  # noqa: E501
                        },
                    },
                    ('ad_group_update_request',): {

                        'max_items': 30,
                        'min_items': 1,
                    },
                },
                'allowed_values': {
                },
                'openapi_types': {
                    'ad_account_id':
                        (str,),
                    'ad_group_update_request':
                        ([AdGroupUpdateRequest],),
                },
                'attribute_map': {
                    'ad_account_id': 'ad_account_id',
                },
                'location_map': {
                    'ad_account_id': 'path',
                    'ad_group_update_request': 'body',
                },
                'collection_format_map': {
                }
            },
            headers_map={
                'accept': [
                    'application/json'
                ],
                'content_type': [
                    'application/json'
                ]
            },
            api_client=api_client
        )

    def ad_groups_analytics(
        self,
        ad_account_id,
        start_date,
        end_date,
        ad_group_ids,
        columns,
        granularity,
        **kwargs
    ):
        """Get ad group analytics  # noqa: E501

        Get analytics for the specified ad groups in the specified <code>ad_account_id</code>, filtered by the specified options. - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.ad_groups_analytics(ad_account_id, start_date, end_date, ad_group_ids, columns, granularity, async_req=True)
        >>> result = thread.get()

        Args:
            ad_account_id (str): Unique identifier of an ad account.
            start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD
            end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD
            ad_group_ids ([str]): List of Ad group Ids to use to filter the results.
            columns ([str]): Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
            granularity (Granularity): TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly

        Keyword Args:
            click_window_days (int): Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.. [optional] if omitted the server will use the default value of 30
            engagement_window_days (int): Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.. [optional] if omitted the server will use the default value of 30
            view_window_days (int): Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.. [optional] if omitted the server will use the default value of 1
            conversion_report_time (str): The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.. [optional] if omitted the server will use the default value of "TIME_OF_AD_ACTION"
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AdGroupsAnalyticsResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['ad_account_id'] = \
            ad_account_id
        kwargs['start_date'] = \
            start_date
        kwargs['end_date'] = \
            end_date
        kwargs['ad_group_ids'] = \
            ad_group_ids
        kwargs['columns'] = \
            columns
        kwargs['granularity'] = \
            granularity
        return self.ad_groups_analytics_endpoint.call_with_http_info(**kwargs)

    def ad_groups_bid_floor_get(
        self,
        ad_account_id,
        bid_floor_request,
        **kwargs
    ):
        """Get bid floors  # noqa: E501

        List bid floors for your campaign configuration. Bid floors are given in microcurrency values based on the currency in the bid floor specification. <p/> <p>Microcurrency is used to track very small transactions, based on the currency set in the advertiser’s profile.</p> <p>A microcurrency unit is 10^(-6) of the standard unit of currency selected in the advertiser’s profile.</p> <p><strong>Equivalency equations</strong>, using dollars as an example currency:</p> <ul>   <li>$1 = 1,000,000 microdollars</li>   <li>1 microdollar = $0.000001 </li> </ul> <p><strong>To convert between currency and microcurrency</strong>, using dollars as an example currency:</p> <ul>   <li>To convert dollars to microdollars, mutiply dollars by 1,000,000</li>   <li>To convert microdollars to dollars, divide microdollars by 1,000,000</li> </ul> For more on bid floors see <a class=\"reference external\" href=\"https://help.pinterest.com/en/business/article/set-your-bid\"> Set your bid</a>.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.ad_groups_bid_floor_get(ad_account_id, bid_floor_request, async_req=True)
        >>> result = thread.get()

        Args:
            ad_account_id (str): Unique identifier of an ad account.
            bid_floor_request (BidFloorRequest): Parameters to get bid_floor info

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            BidFloor
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['ad_account_id'] = \
            ad_account_id
        kwargs['bid_floor_request'] = \
            bid_floor_request
        return self.ad_groups_bid_floor_get_endpoint.call_with_http_info(**kwargs)

    def ad_groups_create(
        self,
        ad_account_id,
        ad_group_create_request,
        **kwargs
    ):
        """Create ad groups  # noqa: E501

        Create multiple new ad groups. All ads in a given ad group will have the same budget, bid, run dates, targeting, and placement (search, browse, other). For more information, <a href=\"https://help.pinterest.com/en/business/article/campaign-structure\" target=\"_blank\"> click here</a>.</p> <strong>Note:</strong> - 'bid_in_micro_currency' and 'budget_in_micro_currency' should be expressed in microcurrency amounts based on the currency field set in the advertiser's profile.<p/> <p>Microcurrency is used to track very small transactions, based on the currency set in the advertiser’s profile.</p> <p>A microcurrency unit is 10^(-6) of the standard unit of currency selected in the advertiser’s profile.</p> <p><strong>Equivalency equations</strong>, using dollars as an example currency:</p> <ul>   <li>$1 = 1,000,000 microdollars</li>   <li>1 microdollar = $0.000001 </li> </ul> <p><strong>To convert between currency and microcurrency</strong>, using dollars as an example currency:</p> <ul>   <li>To convert dollars to microdollars, mutiply dollars by 1,000,000</li>   <li>To convert microdollars to dollars, divide microdollars by 1,000,000</li> </ul> - Ad groups belong to ad campaigns. Some types of campaigns (e.g. budget optimization) have limits on the number of ad groups they can hold. If you exceed those limits, you will get an error message.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.ad_groups_create(ad_account_id, ad_group_create_request, async_req=True)
        >>> result = thread.get()

        Args:
            ad_account_id (str): Unique identifier of an ad account.
            ad_group_create_request ([AdGroupCreateRequest]): List of ad groups to create, size limit [1, 30].

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AdGroupArrayResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['ad_account_id'] = \
            ad_account_id
        kwargs['ad_group_create_request'] = \
            ad_group_create_request
        return self.ad_groups_create_endpoint.call_with_http_info(**kwargs)

    def ad_groups_get(
        self,
        ad_account_id,
        ad_group_id,
        **kwargs
    ):
        """Get ad group  # noqa: E501

        Get a specific ad given the ad ID. If your pin is rejected, rejected_reasons will contain additional information from the Ad Review process. For more information about our policies and rejection reasons see the <a href=\"https://www.pinterest.com/_/_/policy/advertising-guidelines/\" target=\"_blank\">Pinterest advertising standards</a>.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.ad_groups_get(ad_account_id, ad_group_id, async_req=True)
        >>> result = thread.get()

        Args:
            ad_account_id (str): Unique identifier of an ad account.
            ad_group_id (str): Unique identifier of an ad group.

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AdGroupResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['ad_account_id'] = \
            ad_account_id
        kwargs['ad_group_id'] = \
            ad_group_id
        return self.ad_groups_get_endpoint.call_with_http_info(**kwargs)

    def ad_groups_list(
        self,
        ad_account_id,
        **kwargs
    ):
        """List ad groups  # noqa: E501

        List ad groups based on provided campaign IDs or ad group IDs.(campaign_ids or ad_group_ids). <p/> <strong>Note:</strong><p/> Provide only campaign_id or ad_group_id. Do not provide both.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.ad_groups_list(ad_account_id, async_req=True)
        >>> result = thread.get()

        Args:
            ad_account_id (str): Unique identifier of an ad account.

        Keyword Args:
            campaign_ids ([str]): List of Campaign Ids to use to filter the results.. [optional]
            ad_group_ids ([str]): List of Ad group Ids to use to filter the results.. [optional]
            entity_statuses ([str]): Entity status. [optional]
            page_size (int): Maximum number of items to include in a single page of the response. See documentation on <a href='/docs/getting-started/pagination/'>Pagination</a> for more information.. [optional] if omitted the server will use the default value of 25
            order (str): The order in which to sort the items returned: “ASCENDING” or “DESCENDING” by ID. Note that higher-value IDs are associated with more-recently added items.. [optional]
            bookmark (str): Cursor used to fetch the next page of items. [optional]
            translate_interests_to_names (bool): Return interests as text names (if value is true) rather than topic IDs.. [optional] if omitted the server will use the default value of False
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            bool, date, datetime, dict, float, int, list, str, none_type
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['ad_account_id'] = \
            ad_account_id
        return self.ad_groups_list_endpoint.call_with_http_info(**kwargs)

    def ad_groups_targeting_analytics_get(
        self,
        ad_account_id,
        ad_group_ids,
        start_date,
        end_date,
        targeting_types,
        columns,
        granularity,
        **kwargs
    ):
        """Get targeting analytics for ad groups  # noqa: E501

        <strong>This endpoint is currently in beta and not available to all apps. <a href='/docs/features/ads-management/'>Learn more</a>.</strong> <p/> Get targeting analytics for one or more ad groups. For the requested ad group(s) and metrics, the response will include the requested metric information (e.g. SPEND_IN_DOLLAR) for the requested target type (e.g. \"age_bucket\") for applicable values (e.g. \"45-49\"). <p/> - The token's user_account must either be the Owner of the specified ad account, or have one of the necessary roles granted to them via <a href=\"https://help.pinterest.com/en/business/article/share-and-manage-access-to-your-ad-accounts\">Business Access</a>: Admin, Analyst, Campaign Manager.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.ad_groups_targeting_analytics_get(ad_account_id, ad_group_ids, start_date, end_date, targeting_types, columns, granularity, async_req=True)
        >>> result = thread.get()

        Args:
            ad_account_id (str): Unique identifier of an ad account.
            ad_group_ids ([str]): List of Ad group Ids to use to filter the results.
            start_date (date): Metric report start date (UTC). Format: YYYY-MM-DD
            end_date (date): Metric report end date (UTC). Format: YYYY-MM-DD
            targeting_types ([AdsAnalyticsTargetingType]): Targeting type breakdowns for the report. The reporting per targeting type <br> is independent from each other.
            columns ([str]): Columns to retrieve, encoded as a comma-separated string. **NOTE**: Any metrics defined as MICRO_DOLLARS returns a value based on the advertiser profile's currency field. For USD,($1/1,000,000, or $0.000001 - one one-ten-thousandth of a cent). it's microdollars. Otherwise, it's in microunits of the advertiser's currency.<br/>For example, if the advertiser's currency is GBP (British pound sterling), all MICRO_DOLLARS fields will be in GBP microunits (1/1,000,000 British pound).<br/>If a column has no value, it may not be returned
            granularity (Granularity): TOTAL - metrics are aggregated over the specified date range.<br> DAY - metrics are broken down daily.<br> HOUR - metrics are broken down hourly.<br>WEEKLY - metrics are broken down weekly.<br>MONTHLY - metrics are broken down monthly

        Keyword Args:
            click_window_days (int): Number of days to use as the conversion attribution window for a pin click action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.. [optional] if omitted the server will use the default value of 30
            engagement_window_days (int): Number of days to use as the conversion attribution window for an engagement action. Engagements include saves, closeups, link clicks, and carousel card swipes. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `30` days.. [optional] if omitted the server will use the default value of 30
            view_window_days (int): Number of days to use as the conversion attribution window for a view action. Applies to Pinterest Tag conversion metrics. Prior conversion tags use their defined attribution windows. If not specified, defaults to `1` day.. [optional] if omitted the server will use the default value of 1
            conversion_report_time (str): The date by which the conversion metrics returned from this endpoint will be reported. There are two dates associated with a conversion event: the date that the user interacted with the ad, and the date that the user completed a conversion event.. [optional] if omitted the server will use the default value of "TIME_OF_AD_ACTION"
            attribution_types (ConversionReportAttributionType): List of types of attribution for the conversion report. [optional]
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            MetricsResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['ad_account_id'] = \
            ad_account_id
        kwargs['ad_group_ids'] = \
            ad_group_ids
        kwargs['start_date'] = \
            start_date
        kwargs['end_date'] = \
            end_date
        kwargs['targeting_types'] = \
            targeting_types
        kwargs['columns'] = \
            columns
        kwargs['granularity'] = \
            granularity
        return self.ad_groups_targeting_analytics_get_endpoint.call_with_http_info(**kwargs)

    def ad_groups_update(
        self,
        ad_account_id,
        ad_group_update_request,
        **kwargs
    ):
        """Update ad groups  # noqa: E501

        Update multiple existing ad groups.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True

        >>> thread = api.ad_groups_update(ad_account_id, ad_group_update_request, async_req=True)
        >>> result = thread.get()

        Args:
            ad_account_id (str): Unique identifier of an ad account.
            ad_group_update_request ([AdGroupUpdateRequest]): List of ad groups to update, size limit [1, 30].

        Keyword Args:
            _return_http_data_only (bool): response data without head status
                code and headers. Default is True.
            _preload_content (bool): if False, the urllib3.HTTPResponse object
                will be returned without reading/decoding response data.
                Default is True.
            _request_timeout (int/float/tuple): timeout setting for this request. If
                one number provided, it will be total request timeout. It can also
                be a pair (tuple) of (connection, read) timeouts.
                Default is None.
            _check_input_type (bool): specifies if type checking
                should be done one the data sent to the server.
                Default is True.
            _check_return_type (bool): specifies if type checking
                should be done one the data received from the server.
                Default is True.
            _spec_property_naming (bool): True if the variable names in the input data
                are serialized names, as specified in the OpenAPI document.
                False if the variable names in the input data
                are pythonic names, e.g. snake case (default)
            _content_type (str/None): force body content-type.
                Default is None and content-type will be predicted by allowed
                content-types and body.
            _host_index (int/None): specifies the index of the server
                that we want to use.
                Default is read from the configuration.
            async_req (bool): execute request asynchronously

        Returns:
            AdGroupArrayResponse
                If the method is called asynchronously, returns the request
                thread.
        """
        kwargs['async_req'] = kwargs.get(
            'async_req', False
        )
        kwargs['_return_http_data_only'] = kwargs.get(
            '_return_http_data_only', True
        )
        kwargs['_preload_content'] = kwargs.get(
            '_preload_content', True
        )
        kwargs['_request_timeout'] = kwargs.get(
            '_request_timeout', None
        )
        kwargs['_check_input_type'] = kwargs.get(
            '_check_input_type', True
        )
        kwargs['_check_return_type'] = kwargs.get(
            '_check_return_type', True
        )
        kwargs['_spec_property_naming'] = kwargs.get(
            '_spec_property_naming', False
        )
        kwargs['_content_type'] = kwargs.get(
            '_content_type')
        kwargs['_host_index'] = kwargs.get('_host_index')
        kwargs['ad_account_id'] = \
            ad_account_id
        kwargs['ad_group_update_request'] = \
            ad_group_update_request
        return self.ad_groups_update_endpoint.call_with_http_info(**kwargs)

